import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Chart from '../views/charts'
import Slot from '../views/slot'
import Baidu from '../views/baidu'
import TreeTable from '../views/treeTable'
import Dialog from '../views/avue/Dialog.vue'
import UpLoad from '../views/upload/'
import Calendar from '../views/calendar/'

Vue.use(VueRouter)

const routes = [
  {
    path: '/calendar',
    name: 'Calendar',
    component: Calendar
  },
  {
    path: '/upload',
    name: 'UpLoad',
    component: UpLoad
  },
  {
    path: '/dialog',
    name: 'Dialog',
    component: Dialog
  },
  {
    path: '/treeTable',
    name: 'TreeTable',
    component: TreeTable
  },
  {
    path: '/baidu',
    name: 'Baidu',
    component: Baidu
  },
  {
    path: '/slot',
    name: 'Slot',
    component: Slot
  },
  {
    path: '/chart',
    name: 'Chart',
    component: Chart
  },
  {
    path: '/',
    name: 'Home',
    component: Home
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
